package com.demo.feign.server.controller;

import com.demo.feign.api.hello.HelloService;
import com.demo.feign.api.hello.domain.Hello;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloController implements HelloService {

    @Override
    public String hello() {
        return null;
    }

    @Override
    public String hello(String name) {
        return "hello "+name;
    }

    @Override
    public Hello hello(String name, Integer age) {
        return new Hello(name,age);
    }

    @Override
    public String hello(Hello hello) {
        return "Hello "+ hello.getName()+","+hello.getAge();
    }
}
